Object.defineProperty(exports, "__esModule", {
    value: !0
}), exports.default = void 0;

var mergeOptionsToData = function(t) {
    var e, t = 0 < arguments.length && void 0 !== t ? t : {}, n = Object.assign({}, t);
    for (e in n) n.hasOwnProperty(e) && "function" == typeof n[e] && delete n[e];
    return n;
}, bind = function(i, r) {
    return function() {
        for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n];
        return e.length ? i.apply(r, e) : i.call(r);
    };
}, assign = function() {
    for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n];
    return Object.assign.apply(Object, [ {} ].concat(e));
}, _default = Behavior({
    definitionFilter: function(t) {
        t.data = mergeOptionsToData(t.data), t.data.in = !1, t.data.visible = !1;
    },
    methods: {
        $$mergeOptionsToData: mergeOptionsToData,
        $$mergeOptionsAndBindMethods: function(t, e) {
            var n, t = 0 < arguments.length && void 0 !== t ? t : {}, i = 1 < arguments.length && void 0 !== e ? e : this.fns, r = Object.assign({}, t);
            for (n in r) r.hasOwnProperty(n) && "function" == typeof r[n] && (i[n] = bind(r[n], this), 
            delete r[n]);
            return r;
        },
        $$setData: function() {
            for (var e = this, t = arguments.length, n = new Array(t), i = 0; i < t; i++) n[i] = arguments[i];
            var r = assign.apply(void 0, [ {} ].concat(n));
            return new Promise(function(t) {
                e.setData(r, t);
            });
        },
        $$requestAnimationFrame: function(t, e) {
            var t = 0 < arguments.length && void 0 !== t ? t : function() {}, n = 1 < arguments.length && void 0 !== e ? e : 1e3 / 60;
            return new Promise(function(t) {
                return setTimeout(t, n);
            }).then(t);
        }
    },
    created: function() {
        this.fns = {};
    },
    detached: function() {
        this.fns = {};
    }
});

exports.default = _default;